Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't assume USERNAME_FIELD == 'user' in UserAdmin. #427

Closed
wants to merge 1 commit into from

Conversation

gavinwahl
Copy link
Contributor

Never assume that a user object has a field named username, use
USERNAME_FIELD instead.

fixes https://code.djangoproject.com/ticket/19077

Never assume that a user object has a field named `username`, use
`USERNAME_FIELD` instead.

fixes #19077
@ptone
Copy link
Member

ptone commented Oct 7, 2012

as clarified in https://code.djangoproject.com/ticket/19077#comment:6 - the default ModelAdmin will not easily work with custom user models that don't largely conform to auth.User, and the solution is likely to subclass UserAdmin

@ptone ptone closed this Oct 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants